﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AdoNet.Models;

namespace AdoNet.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult GetUserInfo()
        {
            using (GosNetEntities en = new GosNetEntities())
            {
                //var list = en.UserInfo.Where(x => x.userId == 33554608);
                var list = en.basicData.Where(x => x.baseId >= 0).ToList();
                var counts=list.Count();
                var listData = new { count = counts,data=list };
                return Json(listData, JsonRequestBehavior.AllowGet);
            }

        }
    }
}
